package com.zhongke.cotrun.model.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

import javax.validation.constraints.NotNull;

@ApiModel(value = "支付订单表")
@Data
public class PayOrder {
	
	@ApiModelProperty(value = "id主键", example = "123")
	@TableId(type = IdType.AUTO)
	@NotNull(message = "id不能为空")
    private Long id;     
	
    @ApiModelProperty(value = "用户表主键", example = "123")
    @NotNull(message = "用户表主键不能为空")
    private Long userInfoId;
    
    @ApiModelProperty(value = "商品基础信息表主键", example = "123")
    @NotNull(message = "商品基础信息表主键不能为空")
    private Long mallId;
    
    @ApiModelProperty(value = "订单号", example = "123")    
    @NotNull(message = "订单号不能为空")
    private String orderCode;
    
    @ApiModelProperty(value = "优惠券主键", example = "1")    
    private Long couId;
    
    @ApiModelProperty(value = "订单状态 0-待付款，1-已付款 2-已完成 3-已取消 4-已关闭", example = "0")    
    private String state;
    
    @ApiModelProperty(value = "退款手续费", example = "1.00")    
    private double refundPrice;
    
    @ApiModelProperty(value = "订单金额", example = "1.00")    
    private double totalPrice;
    
    @ApiModelProperty(value = "优惠金额", example = "1.00")    
    private double cousePrice;
    
    @ApiModelProperty(value = "实际支付金额", example = "1.00")    
    private double actualPrice;
    
    @ApiModelProperty(value = "付款渠道 0-人工 1-余额 2-微信 3-支付宝 4-现金 5-储蓄卡 6-信用卡 7-转账", example = "0")    
    private String payType;
    
    @ApiModelProperty(value = "付款场景0-线上 1-线下", example = "0")    
    private String sceneType;
    
    @ApiModelProperty(value = "付款方式0-直接付 1-余额", example = "0")    
    private String isBlance;
    
    @ApiModelProperty(value = "商品总件数", example = "1")    
    private int mallNum;
    
    @ApiModelProperty(value = "评价状态0-待评价 1-已评价", example = "0")    
    private String appraiseState;
    
    @ApiModelProperty(value = "支付地址")    
    private String payUrl;
    
    @ApiModelProperty(value = "支付时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date payDate;    
        
    @ApiModelProperty(value = "备注", example = "123")   
    private String remarks;//备注
    @ApiModelProperty(value = "创建人", example = "123")  
    private Long createBy;
    @ApiModelProperty(value = "更新人", example = "123")  
    private Long updateBy;
    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createDate;    
    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateDate;    
    @ApiModelProperty(value = "删除标记（0：正常；1：回收站）", example = "0")    
    private String delFlag;
    
    @TableField(exist = false) 
    private String stateLable; 
    @TableField(exist = false) 
    private String payTypeLable; 
    @TableField(exist = false) 
    private String sceneTypeLable; 
    @TableField(exist = false) 
    private String isBlanceLable; 
    @TableField(exist = false) 
    private String appraiseStateLable; 
    
    @TableField(exist = false) 
    private String title;    
    @TableField(exist = false) 
    private String type;
    @TableField(exist = false) 
    private Long mainId;    
    @TableField(exist = false) 
    private String mainTable;
    @TableField(exist = false) 
    private String imgAddrs; 
    
    @TableField(exist = false) 
    private String userInfoName; 
    @TableField(exist = false) 
    private String userInfoPhone; 
}
